/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#ifndef I_OMEN_STORAGE_SERVER_H
#define I_OMEN_STORAGE_SERVER_H

#include "OmenConfig.h"

#include "IOmenModelFileReader.h"
#include "IOmenImageFileReader.h"
#include "IOmenArchiveReader.h"
#include "IOmenArchive.h"

#include <list>
#include <string>
#include <memory>
#include <stdexcept>

namespace Omen {

  /// <summary>Manages storage related stuff</summary>
  class OMEN_API IStorageServer {
  public:

      virtual ~IStorageServer() {}; /// <summary>Destroys the storage server</summary>

    virtual void addArchiveReader( Omen::IArchiveReader* pArchiveReader) = 0;        /// <summary>Allows plugins to add new archive readers</summary>
    virtual void addModelFileReader( Omen::IModelFileReader* pModelFileReader) = 0; /// <summary>Allows plugins to add new model file readers</summary>
    virtual void addImageFileReader( Omen::IImageFileReader* pImageFileReader) = 0; /// <summary>Allows plugins to add new image file readers</summary>
    
    virtual IArchive*                    openArchive(const std::wstring& filename) = 0;        /// <summry>Opens an archive by searching for a matching archive reader</summary>
    
    virtual IModelFileReader*            getModelFileReader(const std::wstring& filename) = 0; /// <summry>Returns a modelFileReader which can read given file</summary>
    virtual IImageFileReader*            getImageFileReader(const std::wstring& filename) = 0; /// <summary>Return an imageFileReader which can read given file</summary>
  };

} // namespace Omen

#endif // I_OMEN_STORAGE_SERVER_H

